<template>
  <div class="role-search">
    <el-row :gutter="20">
      <el-col :span="6">
        <el-input
          placeholder="请输入内容"
          size="small"
          v-model="listQuery.name"
          clearable
        ></el-input>
      </el-col>
      <el-col :span="6" style="padding: 0">
        <el-button
          type="primary"
          size="small"
          icon="el-icon-search"
          plain
          @click="handleSearch"
          >搜索</el-button
        >
        <el-button
          type="primary"
          icon="el-icon-plus"
          @click="handleAdd"
          v-if="$button('115')"
          size="small"
          >新增</el-button
        >
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  data() {
    return {
      listQuery: {
        name: '',
        page: 1,
      },
    }
  },
  methods: {
    handleSearch() {
      this.$bus.$emit('refreshRoleList', this.listQuery)
    },
    handleAdd() {
      this.$bus.$emit('showDialogRoleAdd')
    },
  },
}
</script>
<style scoped lang="scss">
</style>